package com.woniuxy.usercoachassemble.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.usercoachassemble.dao.YogaGymSignedCoachMapper;
import com.woniuxy.usercoachassemble.entity.YogaGymInfo;
import com.woniuxy.usercoachassemble.dao.YogaGymInfoMapper;
import com.woniuxy.usercoachassemble.entity.YogaGymSignedCoach;
import com.woniuxy.usercoachassemble.service.YogaGymInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Lucas
 * @since 2020-07-18
 */
@Service
public class YogaGymInfoServiceImpl extends ServiceImpl<YogaGymInfoMapper, YogaGymInfo> implements YogaGymInfoService {
    @Autowired
    private YogaGymInfoMapper yogaGymInfoMapper;
    @Autowired
    private YogaGymSignedCoachMapper yogaGymSignedCoachMapper;
    //查询场馆
    @Override
    public List<YogaGymInfo> selectGym(String yoga_gym_name) {
        QueryWrapper<YogaGymInfo> wrapper = new QueryWrapper<>();
        if(yoga_gym_name!=null && !"".equals(yoga_gym_name)){
            wrapper.like("yoga_gym_name",yoga_gym_name);
        }
        return  yogaGymInfoMapper.selectList(wrapper);
    }
}
